| Conditions | 1 |
| Total Lines | 17 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import React from "react" |
||
| 10 | |||
| 11 | // isValid = false, readOnly = false |
||
| 12 | function FormButtons({isValid, readOnly}: Props) { |
||
| 13 | const cssClasses = classNaming() |
||
| 14 | const buttonClass = cssClasses({"button": true}) // "button" |
||
| 15 | |||
| 16 | return <> |
||
| 17 | <button { |
||
| 18 | ...buttonClass // className="button" |
||
| 19 | }>Close</button> |
||
| 20 | <button type="reset" { |
||
| 21 | ...buttonClass({"button--disabled": readOnly}) // className="button" |
||
| 22 | }>Reset</button> |
||
| 23 | <button type="submit" className={`button_submit ${ |
||
| 24 | buttonClass({"button--disabled": readOnly || !isValid}) // "button button--disabled" |
||
| 25 | }`}>Submit</button> |
||
| 26 | </> |
||
| 27 | } |
||
| 37 |